/* R. J. Cano, 11 Feb 2014
  
   A078201 Mirror primes: Prime numbers of the form n^k+k^n
   
   The name comes from the symmetric look of the formula x^w+w^x
   defining this sequence when it is written in plain text for
   computers by using ^ as the power operator. */

a(x)=if(x<1,0,my(w=1,y=0);while(!isprime(y),y=x^w+w^x;w++);y);

/*

Sample output:

? vector(10,j,a(j))
[2, 3, 17, 5, 59604644783353249, 7, 4318114567396436564035293097707729426477458833, 205688069665150755269371147819668813122841983204711281293004769, 593, 11]

? a(11)
unknown (After 8h, 9min, 7,470 ms, the program didn't reported yet a value while running there in the submitter's
machine with capability 32-Bit/1.66GHz/1GbRam. Therefore also classified as: "Not tried yet").

? a(12)
13

a(13) and a(14) not tried yet.

? a(15)
32993

? a(16)
17

a(17) not tried yet.

? a(18)
19

a(19) not tried yet.

? a(20)
293567822846729153486185074598667128421960318613539983838411371441526128139326055432962374798096087878991872000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001130744078866462305067204391781489931289140033838001

? a(21)
2097593

? a(22)
23

a(23) not tried yet.

? a(24)
59604644783353249

From a(25) to a(29) not tried yet.

? a(30)
31

a(31) not tried yet.

a(32)
43143988327398957279342419750374600193

a(33)
8589935681

? a(34)
7259701736680389461922586102342375953169154793471358981661239413987142371528493467259545421437269088935158394128249

a(35) not tried yet.

? a(36)
37

a(37) not tried yet.

? a(38)
5052785737795758503064406447721934417290878968063369478337

a(39) not tried yet.

... ... ...

Trying now arbitrary values for the offset (not necessarily consecutives):

? a(40)
41

? a(70)
71

? a(96)
97

? a(310)
311

? a(49122)
49123

Observation:

As expected: There are trivial cases for a(k),
those where k+1 is prime and therefore a(k)=k+1;

Perhaps interesting questions:

0) ... Should be this considered a "fini" entry in the strict sense of a sequence ??? (a(n) with n up to 10).
...... Or it is just required a huge execution time in order to find a(11) ???

1) ... Moreover: It exist a(n) for any n in the naturals?. This is:
..............
.............. Does it have always a solution? the equation: isprime(a(n))==1 for any n in the naturals.

2) ... Possibility for repeated values: It exists there some pair n1, n2 such that a(n1)=a(n2) ??? 

3) ... Are a(2), a(6), and a(30) the unique Mersenne primes that also are Mirror primes ???

Suggestion:

It might be implemented a code for a(n) using non-positive integers, for example:

a(n)=  0 ... Error!, a bad offset was specified.
a(n)= -1 ... There is no known solution for such n (Perhaps not tried yet).
a(n)= -2 ... A solution is known but it is too large for including it here. Please visit: (url1) for more details.
a(n)= -3 ... None solution is possible for such n (A proof of this is known. Please visit: (url2) for more details).

Allowing the OEIS table to handle such circumstances in an easy way.

4) ... (Related to 3). Particle primes: If alternatively it were defined "Electron prime" to be a Mersenne prime where the charge is
...... the -1 and therefore a "Positron prime" is the same with opposite charge or +1, this is: positron(n)=2^n+1, then: Are there 3,
...... 17, and 5 the unique positron primes that are also Mirror primes?.

Additional PARI-GP code:

*/

isMersennePrime(n)=if(isprime(n)&&(n==(2^floor(log(n+1)/log(2))-1)),1,0);
isElectronPrime(n)=isMersennePrime(n);
isPositronPrime(n)=if(isprime(n)&&(n==(2^floor(log(n-1)/log(2))+1)),1,0);